﻿<?xml version="1.0" encoding="utf-8" ?>
<entities>
  <entity class="demo.Objects.Model.EmployeesInfo" table="employees" dal-class="demo.Objects.DAL.EmployeesDAL" default-orderby-express="id">
    <key-property name="id" column="employee_id" type="System.Int32" generator-type="indentity" />
    <property name="firstName" column="first_name" type="System.String"/>
    <property name="lastName" column="last_name" type="System.String"/>
    <property name="email" column="email" type="System.String"/>
    <property name="jobId" column="job_id" type="System.String"/>
    <property name="salary" column="salary" type="System.Double"/>
    <property name="hireDate" column="hire_date" type="System.DateTime"/>
    <ref-property name="job"
                  ref-entity="demo.Objects.Model.JobsInfo"
                  ref-property="jobId"
                  ref-display-property="title as title_name,minSalary,maxSalary"
                  property="jobId"
                  ref-mode="leftjoin"/>
    <property name="departmentId" column="department_id" type="System.Int32" />
    <ref-property name="departmentName"
                  ref-entity="demo.Objects.Model.DepartmentsInfo"
                  ref-property="departmentId"
                  ref-display-property="departmentName"
                  property="departmentId"
                  ref-mode="leftjoin"/>
  </entity>

  <entity class="demo.Objects.Model.JobsInfo" table="jobs" dal-class="demo.Objects.DAL.JobsDAL" default-orderby-express="jobId">
    <key-property name="jobId" column="job_id" type="System.String"/>
    <property name="title" column="job_title" type="System.String"/>
    <property name="minSalary" column="min_salary" type="System.Double"/>
    <property name="maxSalary" column="max_salary" type="System.Double"/>
  </entity>

  <entity class="demo.Objects.Model.DepartmentsInfo" table="departments" dal-class="demo.Objects.DAL.DepartmentsDAL" default-orderby-express="departmentId">
    <key-property name="departmentId" column="department_id" type="System.Int32"/>
    <property name="departmentName" column="department_name" type="System.String"/>
    <property name="managerId" column="manager_id" type="System.Int32" />
    <property name="locationId" column="location_id" type="System.Int32" />
  </entity>

  <entity class="demo.Objects.Model.RegionsInfo" table="regions" dal-class="demo.Objects.DAL.RegionsDAL" default-orderby-express="regionId">
    <key-property name="regionId" column="region_id" type="System.Int32"/>
    <property name="regionName" column="region_name" type="System.String"/>
  </entity>

  <entity class="demo.Objects.Model.CountriesInfo" table="countries" dal-class="demo.Objects.DAL.CountriesDAL" default-orderby-express="countryId">
    <key-property name="countryId" column="country_id" type="System.String"/>
    <property name="countryName" column="country_name" type="System.String"/>
    <property name="regionId" column="region_id" type="System.Int32" />
  </entity>

  <entity class="demo.Objects.Model.LocationsInfo" table="locations" dal-class="demo.Objects.DAL.LocationsDAL" default-orderby-express="locationId">
    <key-property name="locationId" column="location_id" type="System.Int32"/>
    <property name="streetAddress" column="street_address" type="System.String"/>
    <property name="postalCode" column="postal_code" type="System.String"/>
    <property name="city" column="city" type="System.String" />
    <property name="stateProvince" column="state_province" type="System.String"/>
    <property name="countryId" column="country_id" type="System.String"/>
  </entity>

</entities>
